<html>

    <body>
        <button onclick="sendMessage();">send</button>
    </body>

    <script src="/js/reconnecting-websocket.js"></script>
    <script>
        var ws = new ReconnectingWebSocket("ws://127.0.0.1:8090/atmMessage?userId=1000");
        ws.onopen = function() {
            console.log('onopen()');
        };
        ws.onmessage = function(evt) {
            console.log('recive service message=' + evt.data);
        };
        ws.onclose = function(evt) {
            console.log('websocket close()')
        };
        ws.onerror = function(evt) {
            console.log('websocket error()' + evt.data)
        };

    </script>
</html>